<template>
  <view class="content">
    <view class="msg">
      <button type="primary" @click="openAuth()">发送消息</button>
    </view>
  </view>
</template>

<script>
export default {
  name: "notice",
  data() {
    return {
      tmplIds:['Mc8HbUrM5o3Pl4c0mwCA8tsbnuCjvww9yht7nbDCtWw'],
      AppId: 'wx08d4b995e4a8556b',
      AppSecret: '8c3224376b282d7b499f31bd43cc339e',
    }
  },
  methods:{
    openAuth() {
      uni.requestSubscribeMessage({
        tmplIds: this.tmplIds,
        success: (res) => {
          console.log(res);
        },
        fail: (err) => {
          console.error(err);
        }
      })
    },

  }

}
</script>

<style scoped>

</style>
